//
//  UITextField+YBAdd.h
//  YBCategories
//
//  Created by yiban on 16/6/14.
//  Copyright © 2016年 lcb. All rights reserved.
//
#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

/**
 Provides extensions for `UITextField`.
 */
@interface UITextField (YBAdd)<UITextFieldDelegate>

@property(nonatomic,assign)NSInteger length;

#pragma mark - 限制textfield的最大长度
/* 限制textfield的最大长度 */
-(void)setMaxLength:(NSInteger)maxLength;

#pragma mark - 限制输入只能是数字
/* 限制输入只能是数字 */
-(void)numberOnly:(BOOL)flag;
/**
 Set all text selected.
 */
- (void)selectAllText;

/**
 Set text in range selected.
 
 @param range  The range of selected text in a document.
 */
- (void)setSelectedRange:(NSRange)range;

@end

NS_ASSUME_NONNULL_END
